/*
*Copyright 2021-2023 NERCIS
*
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
*You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*Unless required by applicable law or agreed to in writing, software
*distributed under the License is distributed on an "AS IS" BASIS,
*WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*See the License for the specific language governing permissions and
*limitations under the License.
*/

package cn.ac.nercis.pes.model.standard;

import cn.ac.nercis.pes.common.annotation.CheckField;
import cn.ac.nercis.pes.common.constant.project.SecurityLevel;
import cn.ac.nercis.pes.common.constant.project.SystemState;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 系统标准信息类
 *
 * @author zpy
 * @version 1.0.0
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SystemSDTO {

    /**
     * 系统ID
     */
    private String id;
    /**
     * 系统名称
     */
    private String name;
    /**
     * 安全等级
     */
    private SecurityLevel securityLevel;
    /**
     * S级
     */
    private Integer sLevel;
    /**
     * A级
     */
    private Integer aLevel;
    /**
     * G级
     */
    private Integer gLevel;
    /**
     * 未定级需求级别
     */
    private String reqLevel;
    /**
     * 完成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    protected LocalDateTime finishDate;
    /**
     * 是否备案
     */
    @CheckField(name = "备案情况", isBoolean = true, yesDesc = "已备案", noDesc = "未备案")
    private Boolean isFiling;
    /**
     * 系统状态
     */
    private SystemState state;
    /**
     * 备案号
     */
    @CheckField(name = "备案证明编号")
    private String filingNumber;
    /**
     * 测评结论
     */
    @CheckField(name = "测评结论")
    private String decision;
    /**
     * 系统简介
     */
    @CheckField(name = "系统简介")
    private String desc;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 所属项目ID
     */
    private String projectId;
    /**
     * 测评基本信息
     */
    private SystemEvaluationSDTO evaluation;

    private LocalDateTime createTime;
    private LocalDateTime modifyTime;
}